.comments
  .box.meta
    %h2
      Комментарии
      %span#comments-count= "(#{comments.count})"
    = image_tag 'icons/comments.png', :alt => ""

  = render :partial => 'comments/comment', :collection => comments

  - if current_user.try(:role?, :comment) && document.comments_allowed?
    - @comment = Comment.new
    - @document = document
    = render :partial => 'comments/form', :locals => {:comment => @comment, :document => @document}